home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntinc20 / ioctl.h < prev    next >
C/C++ Source or Header  |  1992-05-15  |  3KB  |  149 lines

  1. #ifndef    _IOCTL_H
  2. #define _IOCTL_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #define TIOCGETP    (('T'<< 8) | 0)
  13. #define TIOCSETP    (('T'<< 8) | 1)
  14. #define TIOCSETN    TIOCSETP
  15. #define TIOCGETC    (('T'<< 8) | 2)
  16. #define TIOCSETC    (('T'<< 8) | 3)
  17. #define TIOCGLTC    (('T'<< 8) | 4)
  18. #define TIOCSLTC    (('T'<< 8) | 5)
  19. #define TIOCGWINSZ    (('T'<< 8) | 11)
  20. #define TIOCSWINSZ    (('T'<< 8) | 12)
  21.  
  22. #ifdef __MINT__
  23. #define FSTAT        (('F'<< 8) | 0)
  24. #define FIONREAD    (('F'<< 8) | 1)
  25. #define FIONWRITE    (('F'<< 8) | 2)
  26. #define TIOCGPGRP    (('T'<< 8) | 6)
  27. #define TIOCSPGRP    (('T'<< 8) | 7)
  28. #define TIOCFLUSH    (('T'<< 8) | 8)
  29. #define TIOCSTOP    (('T'<< 8) | 9)
  30. #define TIOCSTART    (('T'<< 8) | 10)
  31. #define TIOCGXKEY    (('T'<< 8) | 13)
  32. #define TIOCSXKEY    (('T'<< 8) | 14)
  33.  
  34. /* not yet implemented in MiNT */
  35. #define TIOCGETD    (('T'<<8) | 16)
  36. #define TIOCSETD    (('T'<<8) | 17)
  37. #define TIOCLGET    (('T'<<8) | 18)
  38. #define TIOCLSET    (('T'<<8) | 19)
  39.  
  40. #define NTTYDISC    1
  41.  
  42. /* ioctl's to act on processes */
  43. #define PPROCADDR    (('P'<<8) | 1)
  44. #define PBASEADDR    (('P'<<8) | 2)
  45.  
  46. #endif /* __MINT__ */
  47.  
  48. struct tchars {
  49.     char    t_intrc;
  50.     char    t_quitc;
  51.     char    t_startc;
  52.     char    t_stopc;
  53.     char    t_eofc;
  54.     char    t_brkc;
  55. };
  56.  
  57. struct ltchars {
  58.     char    t_suspc;
  59.     char    t_dsuspc;
  60.     char    t_rprntc;
  61.     char    t_flushc;
  62.     char    t_werasc;
  63.     char    t_lnextc;
  64. };
  65.  
  66. #define    CRMOD        0x0001
  67. #define    CBREAK        0x0002
  68. #define    ECHO        0x0004
  69. #define    XTABS        0x0008
  70. #define    RAW        0x0010
  71. #define LCASE        0x0020        /* does nothing */
  72. #define TANDEM        0x1000
  73. #define EVENP        0x4000
  74. #define ODDP        0x8000
  75.  
  76. /* Only ones that are likely to be used are here */
  77. /* ok, but emacs thinks it knows their value */
  78. #define B50        1
  79. #define B75        2
  80. #define B110        3
  81. #define B135        4
  82. #define B150        5
  83. #define B200        6
  84. #define B300        7
  85. #define B600        8
  86. #define B1200        9
  87. #define B1800        10
  88. #define B2400        11
  89. #define B4800        12
  90. #define B9600        13
  91. #define B19200        14
  92. #define B38400        15
  93.  
  94. #define ANYP        (B300|B1200|B2400|B4800|B9600)
  95. /* The ones below aren't supported by the kernel, at least not yet */
  96. #define VTDELAY        0
  97. #define ALLDELAY    0
  98.  
  99. #ifdef __MINT__
  100.  
  101. #define TOSTOP        0x0100
  102. #define XKEY        0x0200
  103.  
  104. struct xkey {
  105.     short    xk_num;
  106.     char    xk_def[8];
  107. };
  108.  
  109. /* some fake defines for the line discipline stuff */
  110.  
  111. #define LCRTBS        0x01
  112. #define LCRTERA        0x02
  113. #define LCRTKIL        0x04
  114. #define LPRTERA        0x10
  115. #define LFLUSHO        0x20
  116. #define LLITOUT        0x100
  117.  
  118. #else
  119.  
  120. #define META        0x0100        /* extension: Alternate as meta key */
  121. #define PASS8        0x0100
  122.  
  123. #endif /* __MINT__ */
  124.  
  125. struct sgttyb {
  126.     char    sg_ispeed;
  127.     char    sg_ospeed;
  128.     char    sg_erase;
  129.     char    sg_kill;
  130.     short    sg_flags;
  131. };
  132.  
  133. struct winsize {
  134.     short    ws_row;
  135.     short    ws_col;
  136.     short    ws_xpixel;
  137.     short    ws_ypixel;
  138. };
  139.  
  140. __EXTERN int ioctl    __PROTO((int, int, void *));
  141. __EXTERN int stty    __PROTO((int, struct sgttyb *));
  142. __EXTERN int gtty    __PROTO((int, struct sgttyb *));
  143.  
  144. #ifdef __cplusplus
  145. }
  146. #endif
  147.  
  148. #endif    /* _IOCTL_H */
  149.